#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(Oxygen, 0.1, limpo_soft@qq.com)
AC_CONFIG_SRCDIR([common/singleton.h])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE(oxygen,0.1)

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC

#Check for thread
PTHREAD_PRESENT=""
AC_CHECK_LIB( pthread, pthread_create, PTHREAD_PRESENT="yes",, $PTHREAD_LIBS -lpthread )
if test "x$PTHREAD_PRESENT" = "xyes"; then
	AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if libpthread is present])
	PTHREAD_LIBS="-lpthread"
	AC_SUBST(PTHREAD_LIBS)
fi

# Checks for libraries.

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([inttypes.h stdint.h stdlib.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE

# Checks for library functions.
AC_CHECK_FUNCS([bzero memset])
AC_OUTPUT(Makefile)
